<template>
  <div class="child2">
    <h3>子组件2</h3>
    <h4>书籍：《{{ book }}》</h4>
    <h4>纪念品：{{ collections }}</h4>
  </div>
</template>

<script setup lang="ts" name="Child2">
import { ref } from "vue";
// 数据

let book = ref("我当像鸟儿一样飞跃高山");
let collections = ref(5);

defineExpose({ book, collections });
</script>

<style scoped>
.child2 {
  margin-top: 20px;
  background-color: orange;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px black;
}
</style>
